<h3>Step 3 of 4: Create the Configuration File</h3>
<?php

if ($step3success == true)
{
?>
<p>You're almost done! The database you specified was populated successfully! To create the configuration file and finish the installation of AudioShout, just do the following:</p>
<ol>
<li>Copy all of the text from the box below and insert it into a blank file on your computer.</li>
<li>At the very top of the file, above the first line, put a less than sign (<), a question mark (?) and the letters "php", all in lowercase. All of these characters should be placed one right after another, so that there are no spaces. This is known as the opening to a PHP code block.</li>
<li>At the very end of the file, below the last line of text, put a question mark (?) and immediately follow it up with a greaer than sign (>), leaving no space between the two characters. This is known as the end of a PHP code block.</li>
<li>Save the new file as "settings.php" and upload it to the "inc" folder of the AudioShout distribution on your Web server.</li>
</ol>
<form name="configdata">
<textarea readonly="readonly">

// AudioShout 0.1.0 Alpha

// Database settings
$dbhost = '<?php echo $newdbhost; ?>';
$dbuser = '<?php echo $newdbuser; ?>';
$dbpass = '<?php echo $newdbpass; ?>';
$dbname = '<?php echo $newdbname; ?>';

// General site settings.
$companyname = "<?php echo $newcompanyname; ?>";
$companyurl = "<?php echo $newcompanyurl; ?>";
$domain = "<?php echo $newdomain; ?>";
$sitename = "<?php echo $newsitename; ?>";
$siteversion = "0.1.0 Alpha";
$maxAge = 0;
$maxsize = 50331648;
$twitterkey = '';
$twittersecret = '';

// Directory paths
// We recommend that you store logs and uploads in a directory that is outside of your publically-accessible Web root.
$basedir = "<?php echo $newbasedir; ?>";
$logsdir = "<?php echo $newlogsdir; ?>";
$uploadsdir = '<?php echo $newuploadsdir; ?>/';
$GeoIPPath = "<?php echo $newbasedir; ?>/inc/GeoIP.dat";
</textarea>
</form>

<p>Once finished, please <a href="index.php?step=4">click here</a> to proceed to the final step of the installation utility.</p>
<hr />
<p><em>Copyright &copy; <?php echo date('Y') ?> Airshock LLC. All rights reserved. Please note that this version of AudioShout is pre-release alpha software and should be considered as such when deployed in a production environment.</em></p>

<?php
exit;
}
?>

<p>Now comes the fun part - setting up the database and creating the configuration file that AudioShout will use to store all of its data. To begin, please complete the form below and then click "Next". Once the database has been populated, you'll get instructions on how to create the actual configuration file.</p>
<p>Important notes:</p>
<ul>
<li> Please make sure that the database you wish to use already exists before you attempt to populate it with AudioShout application data.</li>
<li>When specifying the path to the logs directory, the uploads directory, or the directory where the AudioShout distribution is installed, make sure the value you enter is a full path rather than an absolute path. An example of a full path is "/home/username/public_html/audioshout" (without the quotes).</li>
<li>We recommend that you store logs and uploaded files in a location that is outside of your publically-accessible Web space. For example, if your site files are stored in /home/username/public_html, you might store uploads in /home/username/uploads, because only files in /home/username/public_html are accessible to the public.</li>
<li>When entering your domain name, only enter the last part of the domain rather than the full domain. For example, if your domain name is www.audioshout.com, enter only "audioshout.com".</li>
<li>AudioShout supports the configuration of a multi-node environment for storing and managing uploads. While this cannot be configured during the installation of the script, you'll be able to configure it from within the inc/settings.php file after installation is complete. See the documentation for more details about this feature.</li>
</ul>

  <form method="post" action="index.php?step=3">
<label for="newdbhost">Database hostname: </label><input type="text" name="newdbhost" id="newdbhost" value='localhost' size="30">
<label for="newdbname">Database name: </label><input type="text" name="newdbname" id="newdbname" size="30" value="<?php echo $newdbname; ?>">
<label for="newdbuser">Database username: </label><input type="text" name="newdbuser" id="newdbuser" size="30" value="<?php echo $newdbuser; ?>">
<label for="newdbpass">Database password: </label><input type="text" name="newdbpass" id="newdbpass" size="30" value="<?php echo $newdbpass; ?>">
  <br/>
<label for="newbasedir">Full path to AudioShout distribution (do not add a / at the end): </label><input type="text" name="newbasedir" id="newbasedir" size="30" value="<?php echo $newbasedir; ?>">
<label for="newlogsdir">Full path to location where logs should be stored (do not add a / at the end): </label><input type="text" name="newlogsdir" id="newlogsdir" size="30" value="<?php echo $newlogsdir; ?>">
<label for="newuploadsdir">Full path to location where uploaded files should be stored (do not add a / at the end): </label><input type="text" name="newuploadsdir" id="newuploadsdir" size="30" value="<?php echo $newuploadsdir; ?>">
<label for="newcompanyname">Company name: </label><input type="text" name="newcompanyname" id="newcompanyname" size="30" value="<?php echo $newcompanyname; ?>">
<label for="newcompanyurl">Company Website URL: </label><input type="text" name="newcompanyurl" id="newcompanyurl" size="30" value="<?php echo $newcompanyurl; ?>">
<label for="newsitename">Site name: </label><input type="text" name="newsitename" id="newsitename" size="30" value="<?php echo $newsitename; ?>">
<label for="newdomain">Domain name (e.g. audioshout.com, yoursite.net): </label><input type="text" name="newdomain" id="newdomain" size="30" value="<?php echo $newdomain; ?>">
   <input type="submit" name="submit" value="Next">
  </p>
  </form>
